

<?php

require_once 'db.php';

//print_r($_POST);

$query_string = "";

if(isset($_POST['cnnid']) && isset($_POST['update'])) {

  //  echo "id = " . $_POST['cnnid'] . "   and update = " . $_POST['update'] . "<br>";
    update_newdata_record($_POST['cnnid'],$_POST['update']);
    
    $query_string = "&success=" . $_POST['update'];
    
    if($_POST['update'] == 0){
      $query_string = $query_string . "&wronglang=" . $_POST['cnnid'];
    }
    
}

header('Location: add_record.php?sms=1'.$query_string);

//}

?>